<%@page import="java.net.URLEncoder"%>
<%@page import="java.net.URLDecoder"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:useBean id="des" scope="request" class="accessibleworldsdes.AccessibleWorldsDESJavaBeans"/>
<%try {

String accessCode = request.getParameter("accessCode");

if(!(accessCode==null || "".equals(accessCode))) {
	
    accessCode = des.decryptString(des.getServiceSecretKey(), accessCode);
    accessCode = URLDecoder.decode(accessCode, "UTF-8");
    
    if(des.getAndroidAccessCode().equals(accessCode) || des.getComputerAccessCode().equals(accessCode)) {
    	
         String output = URLEncoder.encode("OK","UTF-8");
         output = output+" "+URLEncoder.encode(session.getId(),"UTF-8");
         output = des.encryptString(des.getServiceSecretKey(),output);
         out.print(output);
    }
}
} catch (Exception ex) {}%>